<?php


namespace app\controllers;


use app\models\request\ReqRegister;
use app\service\UserService;

class UserRegisterController extends BaseJsonController
{
    /**
     * @param $req ReqRegister
     * @param $userInfo
     * @return bool|mixed
     * @throws \app\exception\OaException
     */
    public function doService($req, $userInfo)
    {
        $service = new UserService();
        return $service->register($req);
    }

    protected function injectionReq()
    {
        return new ReqRegister();
    }

    public function needLogin(){
        return false;
    }
}